package com.dyh.quickdemo.demos.lbdnew;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;

import java.io.Serializable;
import java.util.function.Consumer;

/*
@Author=Joey Wheeler
@Date=2021/1/20 9:50
*/
@Slf4j
public class LambdaNewTest {

    @Test
    public void test(){
        fun("1",System.out::println);
        fun("2",System.out::println);
    }

    public void fun(Runnable runnable){
        runnable.run();
    }

    public void fun(Object o,Consumer consumer){
        consumer.accept(o);
    }

    private class S implements Serializable {

    }
}
